
DEFINE VARIABLE sim LIKE sct_sim.

FOR EACH tr_hist WHERE tr_mtl_std = 0 AND tr_type = "iss-wo" AND tr_date > DATE("2006/01/01") AND tr_date < DATE("2006/01/31") NO-LOCK:

    sim = "standard". /*string(Year(tr_date), "9999") + "-" + string(Month(tr_date), "99") + "S".*/

    FIND FIRST sct_det WHERE sct_part = tr_part AND sct_sim = sim AND sct_mtl_tl <> 0 NO-ERROR.
    IF AVAILABLE sct_det THEN
        DISP tr_nbr tr_part tr_site tr_mtl_std sct_site sct_mtl_tl sct_sim tr_type
        WITH WIDTH 200.
END.
